﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using ZhimeiSoft.CharmManager.DOL;

namespace ZhimeiSoft.CharmManager.Server.DAL.Interface
{
    public interface IToDoListDAL
    {
        /// <summary>
        /// 插入一个代办事项
        /// </summary>
        /// <param name="todoListInfo">信息类</param>
        void InsertToDoList(DBEntityToDoList todoListInfo);
        /// <summary>
        /// 插入一个待办事项，并且和预约关联
        /// </summary>
        /// <param name="todoListInfo"></param>
        /// <param name="reservationToDoListInfo"></param>
        void InsertResverationToDoList(DBEntityToDoList todoListInfo, DBEntityReservationToDoList reservationToDoListInfo);
        /// <summary>
        /// 修改一个代办事项
        /// </summary>
        /// <param name="todoListInfo">代办事项</param>
        void UpdateToDoList(DBEntityToDoList todoListInfo);
        /// <summary>
        /// 删除一个代办事项
        /// </summary>
        /// <param name="todoListID">待办事项ＩＤ</param>
        void DeleteToDoList(int todoListID);

        /// <summary>
        /// 根据ID获取代码事项
        /// </summary>
        /// <param name="todoListID"></param>
        /// <returns></returns>
        DataSet GetToDoListForID(int todoListID);
        /// <summary>
        /// 删除预约与待办事项对应表
        /// </summary>
        /// <param name="reservationToDoListInfo"></param>
        void DeleteResverationToDoList(DBEntityReservationToDoList reservationToDoListInfo);
        /// <summary>
        /// 根据预约ID查询对应的提醒ID
        /// </summary>
        /// <param name="reservationID">预约ID</param>
        /// <returns></returns>
        DataSet GetToDoListReservation(int reservationID);
        /// <summary>
        /// 根据时间状态获取代办事项
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        DataSet GetStateToDoList(DateTime startDate, string state);

        /// <summary>
        /// 根据过滤条件获取待办事项
        /// </summary>
        /// <param name="sFilter">过滤条件</param>
        /// <returns></returns>
        DataSet QueryTodoList(string sFilter);
        /// <summary>
        /// 标记代办事项完成
        /// </summary>
        /// <param name="todoListID"></param>
        void MarkCompleted(int todoListID);

        /// <summary>
        /// 检查是否存在过期代办事宜，如果存在，把这些代办事宜的状态改为已过期
        /// </summary>
        void CheckAllExpiredTodoState();
        /// <summary>
        /// 根据todolistID查询预约
        /// </summary>
        /// <param name="todoListID"></param>
        /// <returns></returns>
        DataSet QueryReservationForToDoListID(int todoListID);
    }
}
